import request from "@/utils/request"
const BASE_URL = process.env.VUE_APP_BASE_URL_HRM

/**
 * 分页查询请假记录列表
 * @param {*} data
 */
export function hrmQueryLeaveRecordPageListAPI(data) {
	return request({
		url: BASE_URL + "hrmEmployeeLeaveRecord/queryLeaveRecordPageList",
		method: "post",
		data: data,
		headers: {
			"Content-Type": "application/json;charset=UTF-8"
		}
	})
}

/**
 * 获取请假类型
 * @param {*} data
 */
export function hrmEmployeeLeaveRecordQueryLeaveTypeAPI(data) {
	return request({
		url: BASE_URL + "hrmEmployeeLeaveRecord/queryLeaveTypeList",
		method: "post",
		data: data,
		headers: {
			"Content-Type": "application/json;charset=UTF-8"
		}
	})
}

/**
 * 请假记录导出
 * @param {*} data
 */
export function hrmEmployeeLeaveRecordExportAPI(data) {
	return request({
		url: BASE_URL + "hrmEmployeeLeaveRecord/export",
		method: "post",
		responseType: "blob",
		data,
		headers: {
			"Content-Type": "application/json;charset=UTF-8"
		}
	})
}
